<template>
	<view>
		<uni-swiper-dot class="uni-swiper-dot-box" :info="data" :current="current" field="content">
		  <swiper class="swiper-box" :current="swiperDotIndex" @change="changeSwiper" autoplay="true" :interval="3000">
		    <swiper-item v-for="(item, index) in data" :key="index">
		      <view class="swiper-item" @click="clickBannerItem(item)">
		        <image :src="item.image" mode="aspectFill" :draggable="false" />
		      </view>
		    </swiper-item>
		  </swiper>
		</uni-swiper-dot>
		
			<view style="margin: 10px;">
				<text>旅游景点</text>
			</view>
		
		<view style="display: flex; justify-content: space-between;">
			<view style="display: inline-block; padding: 5px; background-color:limegreen; border-radius: 10px; margin-left: 10px;">
				<image src="../../../static/images/banner/b3.jpg" style="width: 100px; height: 100px; "></image>
				<view style="margin-left: 10px; margin-bottom: 8px;"><text>景点</text></view>
				<view style="margin-left: 10px;"><text>$价格</text>
				<view class="iconfont icon-goumai icon" style="  font-size: 25px; color: yellow; margin-left: 25px;" ></view>
			</view>
		</view>
		<view style="display: inline-block; padding: 5px; background-color:limegreen; border-radius: 10px;  margin: 5px;">
				<image src="../../../static/images/banner/b3.jpg" style="width: 100px; height: 100px; "></image>
				<view style="margin-left: 10px; margin-bottom: 8px;"><text>景点</text></view>
				<view style="margin-left: 10px;"><text>$价格</text>
				<view class="iconfont icon-goumai icon" style="  font-size: 25px; color: yellow; margin-left: 25px;" ></view>
			</view>
		</view>
		<view style="display: inline-block; padding: 5px; background-color:limegreen; border-radius: 10px;  margin-right: 10px;">
				<image src="../../../static/images/banner/b3.jpg" style="width: 100px; height: 100px; "></image>
				<view style="margin-left: 10px; margin-bottom: 8px;"><text>景点</text></view>
				<view style="margin-left: 10px;"><text>$价格</text>
				<view class="iconfont icon-goumai icon" style="  font-size: 25px; color: yellow; margin-left: 25px;" ></view>
			</view>
		</view>
	</view>
	
	<view style="margin: 10px;">
				<text>限时秒杀</text>
			</view>
		
	<view style="display: flex; justify-content: space-between;">
			<view style="display: inline-block; padding: 5px; background-color:limegreen; border-radius: 10px; margin-left: 10px;">
				<image src="../../../static/images/banner/b3.jpg" style="width: 100px; height: 100px; "></image>
				<view style="margin-left: 10px; margin-bottom: 8px;"><text>豪华住宅</text></view>
				<view style="margin-left: 10px;"><text>$价格</text>
				<view class="iconfont icon-goumai icon" style="  font-size: 25px; color: yellow; margin-left: 25px;" ></view>
			</view>
		</view>
		<view style="display: inline-block; padding: 5px; background-color:limegreen; border-radius: 10px;  margin: 5px;">
				<image src="../../../static/images/banner/b3.jpg" style="width: 100px; height: 100px; "></image>
				<view style="margin-left: 10px; margin-bottom: 8px;"><text>休闲小憩</text></view>
				<view style="margin-left: 10px;"><text>$价格</text>
				<view class="iconfont icon-goumai icon" style="  font-size: 25px; color: yellow; margin-left: 25px;" ></view>
			</view>
		</view>
		<view style="display: inline-block; padding: 5px; background-color:limegreen; border-radius: 10px;  margin-right: 10px;">
				<image src="../../../static/images/banner/b3.jpg" style="width: 100px; height: 100px; "></image>
				<view style="margin-left: 10px; margin-bottom: 8px;"><text>萌宠乐园</text></view>
				<view style="margin-left: 10px;"><text>$价格</text>
				<view class="iconfont icon-goumai icon" style="  font-size: 25px; color: yellow; margin-left: 25px;" ></view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				current: 0,
				swiperDotIndex: 0,
				data: [{
				    image: '/static/images/banner/b1.jpg'
				  },
				  {
				    image: '/static/images/banner/b2.jpg'
				  },
				  {
				    image: '/static/images/banner/b3.jpg'
				  }
				]
			}
		},
		methods: {
			clickBannerItem(item) {
			  console.info(item)
			},
			changeSwiper(e) {
			  this.current = e.detail.current
			},
			changeGrid(e) {
						
			},
		}
	}
</script>

<style lang="scss" scoped>
  /* #ifndef APP-NVUE */
  page {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    background-color: #fff;
    min-height: 100%;
    height: auto;
  }

  view {
    font-size: 14px;
    line-height: inherit;
  }
  /* #endif */

  .text {
    text-align: center;
    font-size: 26rpx;
    margin-top: 10rpx;
  }

  .grid-item-box {
    flex: 1;
    /* #ifndef APP-NVUE */
    display: flex;
    /* #endif */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px 0;
	width: 70px;
	border-radius: 100px;
	margin-left: 20px;
	background-color: limegreen;
  }

  .uni-margin-wrap {
    width: 690rpx;
    width: 100%;
    ;
  }

  .swiper {
    height: 300rpx;
  }

  .swiper-box {
    height: 150px;
  }

  .swiper-item {
    /* #ifndef APP-NVUE */
    display: flex;
    /* #endif */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    height: 300rpx;
    line-height: 300rpx;
  }

  @media screen and (min-width: 500px) {
    .uni-swiper-dot-box {
      width: 400px;
      /* #ifndef APP-NVUE */
      margin: 0 auto;
      /* #endif */
      margin-top: 8px;
    }

    .image {
      width: 100%;
    }
  }
</style>
